package com.example.nightmeel.loader;

import java.util.List;

import com.example.nightmeel.db.TimeLineData;

import android.content.AsyncTaskLoader;
import android.content.Context;

public class TimeLineLoader extends AsyncTaskLoader<List<TimeLineData>> {

    private static final String TAG = TimeLineLoader.class.getSimpleName();
    private final TimeLineLoader self = this;

    private EventListener mEventListener = null;

    /**
     * コンストラクタ.
     * @param context
     */
    public TimeLineLoader(Context context, EventListener listener) {
        super(context);
        mEventListener = listener;
    }

    /**
     * バックグラウンド処理.
     */
    @Override
    public List<TimeLineData> loadInBackground() {
        return mEventListener.loadInBackground();
    }

    public interface EventListener {
        public List<TimeLineData> loadInBackground ();
    }

}
